home *** CD-ROM | disk | FTP | other *** search
/ Developer CD Series 1992 June: ROMin Holiday / ADC Developer CD (1992-06) (''ROMin Holiday'')_iso / Developer Connection - 06-1992.iso / Developer Essentials / DTS Sample Code / Macintosh Sample Code / SC.013.OOPTESample / TESampleGlue.a < prev    next >
Encoding:
Text File  |  1989-09-30  |  1.8 KB  |  67 lines  |  [TEXT/MPS ]

  1. ;
  2. ;    Apple Macintosh Developer Technical Support
  3. ;
  4. ;    MultiFinder-Aware Simple TextEdit Sample Application
  5. ;
  6. ;    OOPTESample
  7. ;
  8. ;    TESampleGlue.a        -    Asm Source
  9. ;
  10. ;    Copyright © 1988, 1989 Apple Computer, Inc.
  11. ;    All rights reserved.
  12. ;
  13. ;    Version:        
  14. ;                    1.10                    10/89
  15. ;                    1.00                    04/89
  16. ;
  17. ;    Components:     
  18. ;                    BuildOOPTESample        October 1, 1989
  19. ;                    MOOPTESample.p            October 1, 1989
  20. ;                    OOPTESample.make        October 1, 1989
  21. ;                    TECommon.h                October 1, 1989
  22. ;                    TESampleGlue.a            October 1, 1989
  23. ;                    TESample.r                October 1, 1989
  24. ;                    UApplication.p            October 1, 1989
  25. ;                    UApplication.inc1.p        October 1, 1989
  26. ;                    UDocument.p                October 1, 1989
  27. ;                    UDocument.inc1.p        October 1, 1989
  28. ;                    UTEDocument.p            October 1, 1989
  29. ;                    UTEDocument.inc1.p        October 1, 1989
  30. ;                    UTESample.p                October 1, 1989
  31. ;                    UTESample.inc1.p        October 1, 1989
  32. ;
  33.  
  34. ;
  35. ;    AsmClikLoop
  36. ;
  37. ;    This routine gets called by the TextEdit Manager from TEClick.
  38. ;    It calls the old, default click loop routine that scrolls the
  39. ;    text, and then calls our own Pascal routine that handles
  40. ;    tracking the scroll bars to follow along.  It doesn't bother
  41. ;    with saving registers A0 and D0, because they are trashed
  42. ;    anyway by TextEdit.
  43. ;
  44.  
  45. AsmClikLoop    PROC        EXPORT
  46.  
  47.             IMPORT        GETOLDCLIKLOOP
  48.             IMPORT        PASCALCLIKLOOP
  49.             
  50.             MOVEM.L        D1-D2/A1,-(SP)        ; D0 and A0 need not be saved
  51.             
  52.             CLR.L        -(SP)                ; make space for procedure pointer
  53.             JSR            GETOLDCLIKLOOP        ; get the old clikLoop
  54.             MOVEA.L        (SP)+,A0            ; into A0
  55.             
  56.             MOVEM.L        (SP)+,D1-D2/A1        ; restore the world as it was
  57.             JSR            (A0)                ; and execute old clikLoop
  58.  
  59.             MOVEM.L        D1-D2/A1,-(SP)        ; D0 and A0 need not be saved
  60.             JSR            PASCALCLIKLOOP        ; do our clikLoop
  61.             MOVEQ        #1,D0                ; clear the zero flag so TextEdit keeps going
  62.             MOVEM.L        (SP)+,D1-D2/A1        ; restore the world as it was
  63.             RTS
  64.  
  65.             END 
  66.  
  67.